<?php

namespace app\partneradmin\validate;

use think\Validate;

class UserBank extends Validate
{
    //字段规则
    protected $rule = [
        'user_id' => 'require',
        'ifsc_code' => 'require',
        'bank_name' => 'require',
        'account_number' => 'require',
    ];

    //验证器提示信息
    protected $message = [
        'user_id.require' => 'user_id不能为空',
        'ifsc_code.require' => 'ifsc_code不能为空',
        'bank_name.require' => 'bank_name不能为空',
        'account_number.require' => 'account_number不能为空',
    ];

    //使用场景
    protected $scene = [
        'edit' => ['user_id', 'ifsc_code', 'bank_name', 'account_number'],
        'add' => ['user_id', 'ifsc_code', 'bank_name', 'account_number']
    ];
}